﻿using BootstrapBlazor.Components;
using CodeMan.Domain.Shared.Enums;
using System;
using System.ComponentModel;

namespace CodeMan.Application.Contracts.ClassGens
{
    /// <summary>
    /// 实体类
    /// </summary>
    public class ClassGenDTO
    {
        [AutoGenerateColumn(Ignore = true)]
        public Int64 Id { get; set; }
        /// <summary>
        /// 类名
        /// </summary> 
        [AutoGenerateColumn(Order = 1, Filterable = true, Sortable = true)]
        public string Name { get; set; } 
        /// <summary>
        /// 空间、模块
        /// </summary>
        [AutoGenerateColumn(Order = 2, Filterable = true, Sortable = true)]
        public string Namespace { get; set; }
        /// <summary>
        /// 说明
        /// </summary>
        [AutoGenerateColumn(Order = 3, Filterable = true, Sortable = true)]
        public string Desc { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        [AutoGenerateColumn(Order = 5, Sortable = true)]
        public ClassTypeEnum Type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [DisplayName("是/否")]
        [AutoGenerateColumn(Order = 30, Width = 70, ComponentType = typeof(Switch))]
        public bool Complete { get; set; } = true;
        /// <summary>
        /// 来源标记
        /// </summary>
        public FromTypeEnum FromType { get; set; }

        /// <summary>
        /// 字段集合
        /// </summary> 
        //public virtual ICollection<ClassAttribute> Attributes { get; set; } = new Collection<ClassAttribute>();

    }
}
